Nuclear energy is an important source of low-carbon electricity, playing a role in helping countries meet rising energy needs while reducing greenhouse-gas emissions. However, nuclear energy adoption has not been the worldwide 1st approach to energy. Some countries have expanded nuclear energy production, while others have reduced output or phased out facilities, especially after major events such as its use in weaponry and power plant accidents.
This project examines historical nuclear electricity production across countries to identify long-term trends, compare major producers, and understand how global patterns may reflect policy, safety, and environmental considerations. This analysis aims to provide insight into nuclear energy’s place in today’s energy landscape and its potential role in the future.
The dataset used in this project comes from Our World in Data, an open-access research platform that compiles global historical information about energy, climate, and development. The file includes country-level observations of nuclear electricity production over time.
Key variables include:
The data spans multiple countries and years, allowing us to observe long-term nuclear energy trends globally. It allows comparisons across countries and time. This dataset is useful for exploring how nuclear power has changed, which nations produce the most, and how external events or policy changes may have influenced energy production.
The top 5 countries with the highest nuclear energy production in the most recent year are in the following order United States, France, China, Russia, and South Korea. These countries have consistently been among the leading producers of nuclear electricity worldwide.
Identify which countries produce the most nuclear electricity in the most recent year, and visualize their output.
I used library(tifyverse) to load the full tidyverse collection (dplyr, ggplot2, etc.) used for data filtering, summarizing, and visualizing.
Filtering the data set to include only rows with valid country codes nuclear_countries <- nuclear %>% filter(!is.na(code)) includes aggregated regions such as World, Europe, G7, OECD, etc. These have no 3-letter country code, so keeping only rows with code ≠ NA automatically removes these aggregates.
I labeled top_countries and set the the slice_max to 6, to only include the top 6 countires worldwide. Here I will breakdown each area and what it represents.
library(tidyverse)
# Filter
nuclear_countries <- nuclear %>%
filter(!is.na(code)) # keep only rows with a 3-letter country code
# Identify top nuclear-producing countries by total generation
top_countries <- nuclear_countries %>%
group_by(country) %>%
filter(year == latest_year) %>%
arrange(desc(nuclear_TWh)) %>%
summarize(total_gen = sum(nuclear_TWh, na.rm = TRUE)) %>%
slice_max(total_gen, n = 6) %>% # top 6 producers
pull(country)
top_countries
## [1] "World" "United States" "China" "France"
## [5] "Russia" "South Korea"
# Bar Chart
top_latest <- nuclear_countries %>%
filter(country %in% top_countries, year == latest_year)
ggplot(top_latest, aes(x = reorder(country, nuclear_TWh), y = nuclear_TWh)) +
geom_col(fill = "darkgreen") +
coord_flip() +
labs(
title = paste("Top Nuclear-Producing Countries in", latest_year),
x = "Country",
y = "Nuclear Electricity (TWh)"
) +
theme_minimal()
Based on the most recent year available, the top nuclear-producing countries were:
These countries remain the global leaders due to sustained policy support, established reactor fleets, and long-term technological investment.
The global trend in nuclear electricity generation shows sustained growth from the 1970s through the early 2000s. Even after the 1986 Chernobyl disaster, worldwide nuclear output continued to increase. This reflects the fact that most countries did not immediately halt or reduce nuclear production, and many reactors built in earlier decades were still expanding or coming online in the years following the accident.
Global nuclear electricity generation shows a clear long-term trend:
library(dygraphs)
library(xts)
global_xts <- xts(global_nuclear$global_gen,
order.by = as.Date(paste0(global_nuclear$year, "-01-01")))
dygraph(global_xts, main = "Global Nuclear Energy Generation Over Time") %>%
dySeries("V1", label = "TWh", color = "green") %>%
dyRangeSelector() %>%
dyOptions(fillGraph = TRUE, fillAlpha = 0.3, colors = "green")
A noticeable shift emerges after the 2011 Fukushima accident. In the years immediately following Fukushima, global nuclear generation declines as countries such as Japan, Germany, and others shut down reactors or tightened regulatory standards. This suggests that while nuclear energy remained a significant part of the global energy mix, concerns about safety and public opposition following major accidents influenced the pace of new reactor construction and led some countries to reduce their reliance on nuclear power. However, this decline is not permanent.
Shortly after 2012, nuclear energy generation increases, indicating that it was still being used as a major source of low-carbon electricity. This rebound may reflect ongoing investments in nuclear technology, the commissioning of new reactors within countries and the recognition of nuclear power’s role in meeting climate goals.
Soon after some time, in 2023 we witness a steep ongoing decline that could be attributed to various reasons such a combination of aging reactor retirements, slower construction timelines for new facilities, and evolving national energy policies as the population increases and energy demands grow.
Overall, the data show that while major nuclear accidents can influence public perception and policy decisions, nuclear energy remains a resilient and substantial contributor to the world’s electricity supply. Its long-term stability highlights its continued role as a reliable, large-scale, low-emission energy source within the global mix.
To compare how nuclear energy usage differs among countries by visualizing production over time for the top nuclear-producing nations.
For this section, I decided to use a heat map to visualize nuclear electricity production across countries and years. Heat maps are effective for showing variations in data intensity, making it easy to see which countries produce more or less nuclear energy over time.
I removed grouped categories such as Ember, EI, OECD variants, and regional aggregates to focus on individual countries.
We calculate each country’s total nuclear output and select the top 10 by using slice head(n = 10). This ensures we focus on the most relevant producers for clarity.
heat_df <- nuclear_clean %>% filter(country %in% top_countries, year >= 2000) %>% group_by(country, year) %>% summarize(total_TWh = sum(nuclear_TWh, na.rm = TRUE)) %>% ungroup() by using this we keep only the top countires, years 2000+ for nuclear relevancy, and summarize total TWh per country-year.
The log scaled used helped distinguish countries with both low and high production. Tiles show how output changes by country and year.
library(tidyverse)
library(ggplot2)
library(viridis)
# Remove group names: Ember/EI/OECD variants, regions, income groups, etc.
nuclear_clean <- nuclear %>%
filter(
# Remove entries with parenthesis (Ember), (EI), (OECD)
!str_detect(country, "\\("),
# Remove global or regional aggregates
!country %in% c(
"World", "Africa", "Asia", "Europe", "European Union (27)",
"North America", "South America", "Latin America and Caribbean",
"Oceania", "Central America", "Middle East", "CIS",
"High-income countries", "Upper-middle-income countries",
"Lower-middle-income countries", "Low-income countries"
)
)
# Identify only nuclear-producing countries (non-zero output)
producers <- nuclear_clean %>%
group_by(country) %>%
summarize(total = sum(nuclear_TWh, na.rm = TRUE)) %>%
filter(total > 0) %>%
arrange(desc(total))
# Choose top countries for clarity
top_countries <- producers %>% slice_head(n = 10) %>% pull(country)
# heatmap dataset
heat_df <- nuclear_clean %>%
filter(country %in% top_countries, year >= 2000) %>%
group_by(country, year) %>%
summarize(total_TWh = sum(nuclear_TWh, na.rm = TRUE)) %>%
ungroup()
# Order countries by total output (clean & readable)
heat_df <- heat_df %>%
mutate(country = factor(country, levels = rev(top_countries)))
# Plot heatmap
ggplot(heat_df, aes(x = year, y = country, fill = total_TWh)) +
geom_tile(color = "white", linewidth = 0.3) +
scale_fill_viridis(
option = "plasma",
trans = "log10",
breaks = c(1, 10, 100, 1000),
labels = c("1", "10", "100", "1000"),
name = "TWh\n(log scale)"
) +
labs(
title = "Nuclear Electricity Production Heatmap by Country",
x = "Year",
y = "Country"
) +
theme_minimal(base_size = 12) +
theme(
axis.text.y = element_text(size = 8),
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(size = 15, face = "bold"),
panel.grid = element_blank()
)
The heatmap shows major differences in nuclear production among the top countries.
To compare nuclear output before vs after the 2011 Fukushima accident for the world’s top nuclear-producing countries.
For this code, I filtered out the yeards around the Fukushima event (2010 and 2012) to see how nuclear output changed immediately before and after the accident. I focused on the top 10 nuclear-producing countries to highlight the most relevant changes and only keeping 2010 (before Fukushima) and 2012 (after Fukushima). I reshaped the data so each row contains a country’s before and after values.
What this graph shows:
# filtering out aggregated regions
nuclear_clean <- nuclear %>%
filter(
!str_detect(country, "\\("), # removes (Ember), (EI), (OECD)
!country %in% c(
"World", "High-income countries", "Upper-middle-income countries",
"Lower-middle-income countries", "Low-income countries",
"Europe", "Asia", "North America", "South America",
"Latin America and Caribbean", "Oceania",
"G20", "EU", "European Union (27)"
)
)
# filtering for top 10 countries before and after Fukushima (2010 to 2012)
before_after <- nuclear_clean %>%
filter(year %in% c(2010, 2012)) %>%
pivot_wider(names_from = year,
values_from = nuclear_TWh,
names_prefix = "yr_") %>%
drop_na(yr_2010, yr_2012) %>%
arrange(desc(yr_2010)) %>%
slice_head(n = 10) # top 10 real countries
# plotting
p4 <- ggplot(before_after) +
geom_segment(aes(x = yr_2010, xend = yr_2012,
y = reorder(country, yr_2010),
yend = reorder(country, yr_2010)),
color = "black") +
geom_point(aes(x = yr_2010, y = country),
color = "red", size = 3) +
geom_point(aes(x = yr_2012, y = country),
color = "blue", size = 3) +
labs(
title = "Change in Nuclear Output Before vs After Fukushima (2010 → 2012)",
subtitle = "Red = Before (2010), Blue = After (2012)",
x = "Nuclear Electricity (TWh)",
y = "Country"
) +
theme_minimal()
plotly::ggplotly(p4)
The Fukushima disaster triggered sharp declines in nuclear output for several major producers. Japan shows the most dramatic drop, falling from ~280 TWh in 2010 to near zero by 2012. Germany also declines noticeably as part of its nuclear phase-out policy. Meanwhile, countries like the SOuth Korea, Russia, and China show relatively stable or slightly increasing output during the same period. This indicates that Fukushima caused major policy and production changes in a few key countries, but the global nuclear landscape did not uniformly decline.
In my graph, what is is highlighted is how nuclear energy’s contribution to electricity generation is distributed across global regions in the modern era. North America and Europe clearly dominate nuclear output, producing substantially higher average annual generation compared to other regions. This reflects decades of established reactor capacity, consistent policy support, and investments in long-term energy security.
Regions such as Asia display meaningful but more moderate levels of nuclear generation, suggesting ongoing expansion but not yet at the scale of the largest producers. Meanwhile, Latin America, the Middle East, Africa, and other regions show minimal nuclear output, indicating limited infrastructure, higher financial barriers, or stronger reliance on alternative energy sources.
library(dplyr)
library(ggplot2)
library(plotly)
library(countrycode)
nuclear <- nuclear %>%
mutate(region = countrycode(code, "iso3c", "region"))
nuclear_region <- nuclear %>%
filter(!is.na(region))
# Average nuclear generation by region in recent decades
q5_summary <- nuclear_region %>%
filter(year >= 2000, nuclear_TWh > 0) %>% #modern period
group_by(region) %>%
summarize(avg_TWh = mean(nuclear_TWh, na.rm = TRUE)) %>%
arrange(desc(avg_TWh))
# Static bar plot
p5 <- q5_summary %>%
ggplot(aes(x = reorder(region, avg_TWh),
y = avg_TWh,
fill = region)) +
geom_col() +
coord_flip() +
labs(
title = "Average Nuclear Electricity Generation by Region",
subtitle = "Mean annual nuclear generation (TWh), 2000–2024",
x = "Region",
y = "Average Nuclear Electricity Generation (TWh)"
) +
theme_minimal(base_size = 13) +
theme(
plot.title = element_text(face = "bold"),
plot.subtitle = element_text(color = "Black"),
legend.position = "none"
)
ggplotly(p5)
Together, these patterns suggest that nuclear energy plays a central role in decarbonization and energy security primarily in regions that have already built large, stable nuclear fleets. In these regions, nuclear power contributes reliable, low-carbon baseload electricity.
Overall, the evidence suggests that while nuclear energy is not without risks, it remains a critical component of the global clean-energy mix, offering reliable baseload power that complements intermittent renewable sources such as solar and wind. Its long-term stability and low emissions position it as an important pillar for meeting climate goals while ensuring consistent and secure access to electricity.
In conclusion, the data shows that nuclear energy has remained a steady and important source of low-carbon electricity around the world. The top-producing countries continue to generate large amounts of nuclear power, and global trends highlight long periods of growth with only temporary slowdowns after major events. Even when accidents like Fukushima created policy shifts, nuclear energy still remained a major part of the global energy mix.
Regionally, North America, Europe, and parts of Asia carry most of the world’s nuclear production, while other regions contribute far less. This uneven distribution reflects differences in infrastructure, investment, and national priorities.
Taken together, these trends suggest that nuclear energy plays a strong role in supporting decarbonization and energy security. It provides reliable, large-scale, low-carbon electricity that helps countries meet energy needs while reducing emissions. Even with challenges, nuclear power continues to be a key part of the global clean-energy landscape.